.class public Lorg/zeam/LauncherDialogAdapter;
.super Landroid/widget/BaseAdapter;
.source "LauncherDialogAdapter.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lorg/zeam/LauncherDialogAdapter$ListItem;
    }
.end annotation


# static fields
.field public static final ITEM_ADD_ITEM:I = 0x0

.field public static final ITEM_PREFERENCES:I = 0x2

.field public static final ITEM_SET_WALLPAPER:I = 0x1


# instance fields
.field private final mInflater:Landroid/view/LayoutInflater;

.field private final mItems:Ljava/util/ArrayList;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/ArrayList",
            "<",
            "Lorg/zeam/LauncherDialogAdapter$ListItem;",
            ">;"
        }
    .end annotation
.end field


# direct methods
.method public constructor <init>(Lorg/zeam/Launcher;)V
    .locals 7
    .parameter "launcher"

    .prologue
    .line 47
    invoke-direct {p0}, Landroid/widget/BaseAdapter;-><init>()V

    .line 22
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    iput-object v0, p0, Lorg/zeam/LauncherDialogAdapter;->mItems:Ljava/util/ArrayList;

    .line 48
    invoke-virtual {p1}, Lorg/zeam/Launcher;->getResources()Landroid/content/res/Resources;

    move-result-object v2

    .line 49
    .local v2, resources:Landroid/content/res/Resources;
    const-string v0, "layout_inflater"

    invoke-virtual {p1, v0}, Lorg/zeam/Launcher;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/view/LayoutInflater;

    iput-object v0, p0, Lorg/zeam/LauncherDialogAdapter;->mInflater:Landroid/view/LayoutInflater;

    .line 50
    iget-object v6, p0, Lorg/zeam/LauncherDialogAdapter;->mItems:Ljava/util/ArrayList;

    new-instance v0, Lorg/zeam/LauncherDialogAdapter$ListItem;

    const v3, 0x7f0a004e

    const v4, 0x7f020014

    const/4 v5, 0x0

    move-object v1, p0

    invoke-direct/range {v0 .. v5}, Lorg/zeam/LauncherDialogAdapter$ListItem;-><init>(Lorg/zeam/LauncherDialogAdapter;Landroid/content/res/Resources;III)V

    invoke-virtual {v6, v0}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    .line 51
    iget-object v6, p0, Lorg/zeam/LauncherDialogAdapter;->mItems:Ljava/util/ArrayList;

    new-instance v0, Lorg/zeam/LauncherDialogAdapter$ListItem;

    const v3, 0x7f0a0075

    const v4, 0x7f020015

    const/4 v5, 0x1

    move-object v1, p0

    invoke-direct/range {v0 .. v5}, Lorg/zeam/LauncherDialogAdapter$ListItem;-><init>(Lorg/zeam/LauncherDialogAdapter;Landroid/content/res/Resources;III)V

    invoke-virtual {v6, v0}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    .line 52
    iget-object v6, p0, Lorg/zeam/LauncherDialogAdapter;->mItems:Ljava/util/ArrayList;

    new-instance v0, Lorg/zeam/LauncherDialogAdapter$ListItem;

    const v3, 0x7f0a0077

    const v4, 0x7f020013

    const/4 v5, 0x2

    move-object v1, p0

    invoke-direct/range {v0 .. v5}, Lorg/zeam/LauncherDialogAdapter$ListItem;-><init>(Lorg/zeam/LauncherDialogAdapter;Landroid/content/res/Resources;III)V

    invoke-virtual {v6, v0}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    .line 53
    return-void
.end method


# virtual methods
.method public getCount()I
    .locals 1

    .prologue
    .line 70
    iget-object v0, p0, Lorg/zeam/LauncherDialogAdapter;->mItems:Ljava/util/ArrayList;

    invoke-virtual {v0}, Ljava/util/ArrayList;->size()I

    move-result v0

    return v0
.end method

.method public getItem(I)Ljava/lang/Object;
    .locals 1
    .parameter "position"

    .prologue
    .line 74
    iget-object v0, p0, Lorg/zeam/LauncherDialogAdapter;->mItems:Ljava/util/ArrayList;

    invoke-virtual {v0, p1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v0

    return-object v0
.end method

.method public getItemId(I)J
    .locals 2
    .parameter "position"

    .prologue
    .line 78
    int-to-long v0, p1

    return-wide v0
.end method

.method public getView(ILandroid/view/View;Landroid/view/ViewGroup;)Landroid/view/View;
    .locals 7
    .parameter "position"
    .parameter "convertView"
    .parameter "parent"

    .prologue
    const/4 v6, 0x0

    .line 57
    if-nez p2, :cond_0

    .line 58
    iget-object v3, p0, Lorg/zeam/LauncherDialogAdapter;->mInflater:Landroid/view/LayoutInflater;

    const v4, 0x7f030009

    const/4 v5, 0x0

    invoke-virtual {v3, v4, p3, v5}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;Z)Landroid/view/View;

    move-result-object p2

    .line 60
    :cond_0
    move-object v0, p2

    check-cast v0, Landroid/widget/TextView;

    move-object v2, v0

    .line 61
    .local v2, textView:Landroid/widget/TextView;
    invoke-virtual {p0, p1}, Lorg/zeam/LauncherDialogAdapter;->getItem(I)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lorg/zeam/LauncherDialogAdapter$ListItem;

    .line 63
    .local v1, item:Lorg/zeam/LauncherDialogAdapter$ListItem;
    iget-object v3, v1, Lorg/zeam/LauncherDialogAdapter$ListItem;->image:Landroid/graphics/drawable/Drawable;

    invoke-virtual {v2, v3, v6, v6, v6}, Landroid/widget/TextView;->setCompoundDrawablesWithIntrinsicBounds(Landroid/graphics/drawable/Drawable;Landroid/graphics/drawable/Drawable;Landroid/graphics/drawable/Drawable;Landroid/graphics/drawable/Drawable;)V

    .line 64
    iget-object v3, v1, Lorg/zeam/LauncherDialogAdapter$ListItem;->mText:Ljava/lang/CharSequence;

    invoke-virtual {v2, v3}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 65
    invoke-virtual {v2, v1}, Landroid/widget/TextView;->setTag(Ljava/lang/Object;)V

    .line 66
    return-object p2
.end method
